package com.jf.cloud.user.controller.platform;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.user.dto.UserLevelLogDTO;
import com.jf.cloud.user.service.UserLevelLogService;
import com.jf.cloud.user.vo.UserLevelLogVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author: zsm
 * @date: 2023/2/3 16:49
 */
@RestController("platformUserLevelLogController")
@RequestMapping("/p/user_level_log")
@Tag(name = "用户等级记录")
public class UserLevelLogController {

    @Autowired
    private UserLevelLogService userLevelLogService;

    @GetMapping("/pageBuyLevelLog" )
    @Operation(summary = "获取付费会员购买记录" , description = "获取付费会员购买记录")
    ServerResponseEntity<PageVO<UserLevelLogVO>> getUserLevelLogPage(@Valid PageDTO pageDTO, @ParameterObject UserLevelLogDTO userLevelLogDTO) {
        return ServerResponseEntity.success(userLevelLogService.pageBuyLevelLog(pageDTO,userLevelLogDTO));
    }

}
